Purely Functional Incremental Computing
نویسندگان
چکیده
Many applications have to maintain evolving data sources as well as views on these sources. If sources change, the corresponding views have to be adapted. Complete recomputation of views is typically too expensive. An alternative is to convert source changes into view changes and apply these to the views. This is the key idea of incremental computing. In this paper, we use Haskell to develop an incremental computing framework. We illustrate the concepts behind this framework by implementing several example computations on sequences. Our framework allows the user to implement incremental computations using arbitrary monad families that encapsulate mutable state. This makes it possible to use highly efficient algorithms for core computations.
منابع مشابه
Monads for Incremental Computing Functional Pearl
This paper presents a monadic approach to incremental computation, suitable for purely functional languages such as Haskell. A program that uses incremental computation is able to perform an incremental amount of computation to accommodate for changes in input data. Recently, Acar, Blelloch and Harper presented a small Standard ML library that supports efficient, high-level incremental computat...
متن کاملArrays, Non-Determinism, Side-Effects, and Parallelism: A (Pseudo-)Functional Perspective
Purely functional incremental updates to arrays, executed in a non-deterministic manner, are shown to achieve the same effect (in both efficiency and functionality) as parallel assignments to imperative arrays. The strategy depends only on the ability of a compiler to recognize that incremental updates to functional arrays can be done destructively (an optimization often called “copy-avoidance”...
متن کاملTyped Adapton: Refinement types for nominal memoization
Nominal memoization combines memoized functional programming with a controlled form of imperative cache effects. By leveraging these imperative effects, nominal memoization can dramatically outperform traditional (“structural”) memoization. However, the nominal memoization programming model is error-prone: when the programmer unintentionally misuses names, their incremental program ceases to co...
متن کاملTyped Adapton:
Nominal memoization combines memoized functional programming with a controlled form of imperative cache effects. By leveraging these imperative effects, nominal memoization can dramatically outperform traditional (“structural”) memoization. However, the nominal memoization programming model is error-prone: when the programmer unintentionally misuses names, their incremental program ceases to co...
متن کاملFunctional Incremental Attribute Evaluation
This paper presents a new strict, purely functional implementation of attribute grammars. Incremental evaluation is obtained via standard function memoization. Our new implementation of attribute grammars increases the incremental behaviour of the evaluators by both reducing the memoization overhead and increasing their potential incrementallity. We present also an attribute grammar transformat...
متن کامل